package com.mzj.saas.mservice.bill.repository;

import com.mzj.saas.mservice.bill.entity.HouseExpenseRent;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface HouseExpenseRentRepository extends PagingAndSortingRepository<HouseExpenseRent, Long>, JpaSpecificationExecutor<HouseExpenseRent>, JpaRepository<HouseExpenseRent,Long> {
    @Query("from HouseExpenseRent where id=:Id ")
    HouseExpenseRent findById(@Param("Id") String Id);
    List<HouseExpenseRent> findByHouseIdAndChargeTypeAndEnableStatusAndStatus(String houseId, Integer chargeType, Integer enableStatus, Integer status);

    List<HouseExpenseRent> findByHouseIdAndChargeTypeAndStatus(String houseId, Integer chargeType, Integer status);
}
